﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">

    <title>PlungerJS 1.0.0</title>

    <link rel="Stylesheet" type="text/css" href="css/estilo.css" />


</head>
<body>
    <header>
        <hgroup>
            <h1>PlungerJS</h1>
            <h2>Framework javascript não obstrutivo.</h2>
            <h3>versão 1.0.0</h3>
        </hgroup>
	</header>
    <section data-render="teste2">

    </section>
<script type="text/javascript" src="scripts/jquery-2.0.3.min.js"></script>

<script type="text/javascript" src="../plungerjs-1.0.0.js"></script>

<script type="text/javascript">

    PlungerJs.add("teste1", function () {
        var me = this;

        this.render = function ($a) {
            console.log('chamou o teste 1');
        }

        this.metodoTeste1 = function () {
            console.log('metodoTeste1');
        }
        //return this;
    });

    PlungerJs.add("teste1a", function () {
        var me = this;

        this.render = function ($a) {
            console.log('chamou o teste 1a');
        }

        this.metodoTeste1 = function () {
            console.log('metodoTeste1a');
        }
        //return this;
    });

    PlungerJs.add("teste2", function () {
        var me = this;

        this.render = function ($a) {
            this.teste1.render();
            console.log('chamou o teste 2');
            this.teste1.metodoTeste1();
            this.teste1a.metodoTeste1();
        }

        //return this;
    }, "teste1", "teste1a")

</script>

</body>
</html>
